Skip to content

feat(Algebra/Homology/HomologicalComplex): use to_dual - #44672

Open
JovanGerb wants to merge 21 commits into
leanprover-community:masterfrom
JovanGerb:Jovan-to_dual-HomologicalHomplex
Open

JovanGerb wants to merge 21 commits into
leanprover-community:masterfrom
JovanGerb:Jovan-to_dual-HomologicalHomplex

Conversation

@JovanGerb

@JovanGerb JovanGerb commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

This PR uses to_dual on HomologicalComplex, making ChainComplex dual to CochainComplex.

  • The type of CochainComplex.ofHom and CochainComplex.mkHom changed: the direction of the equality flipped to match with the dual.
  • HomologicalComplex.Hom.sqFrom gained a simps! attribute to replace two manually written lemmas.
  • ChainComplex.mkAux and ChainComplex.mkHomAux needed to use to_dual existing, because to_dual currently doesn't like recursive definitions that use a match for the recursion.
  • mkXIso and mk'XIso and a few theorems didn't have duals before this PR.

@JovanGerb JovanGerb added the WIP Work in progress label Oct 9, 2026
@github-actions github-actions Bot added the tech debt Fixes cross-cutting technical debt, see the "technical debt counters" stream on zulip label Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

PR summary b348a07fcd

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ _root_.CochainComplex.mkAux
+ _root_.CochainComplex.mkHomAux
- CochainComplex
- comm_to
- dTo
- dTo_eq
- dTo_eq_zero
- down'
- instance (f : C₁ ⟶ C₂) [IsSplitMono f] (j : ι) : IsSplitMono (f.f j)
- mk
- mk'
- mk'_X_0
- mk'_X_1
- mkAux
- mkHom
- mkHomAux
- mkHom_f_0
- mkHom_f_1
- mkHom_f_succ_succ
- mk_X_0
- mk_X_1
- mk_X_2
- mono_of_mono_f
- next
- of
- ofHom
- of_X
- of_d
- prev_eq
- prev_nat_succ
- prev_nat_zero
- sqFrom_left
- sqFrom_right
- sqTo
- sqTo_left
- sqTo_right
- xPrev
- xPrevIso
- xPrevIsoSelf
- xPrevIsoSelf_comp_dTo
- xPrevIso_comp_dTo
-+- of.d
-- prev
--+ of_d_ne

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean)

✅ Lean-aware diff — post-build, computed from the Lean environment (commit b348a07).

  • +13 new declarations
  • −0 removed declarations
+CochainComplex.mk'XIso
+CochainComplex.mk'_congr_pred'_d
+CochainComplex.mk'_d
+CochainComplex.mk'_d_0_1
+CochainComplex.mkAux_eq_shortComplex_mk_d_comp_d
+CochainComplex.mkXIso
+CochainComplex.mk_congr_pred_X₃
+CochainComplex.mk_congr_pred_d₂
+CochainComplex.mk_d
+CochainComplex.mk_d_0_1
+CochainComplex.mk_d_1_2
+HomologicalComplex.Hom.sqTo_comp
+HomologicalComplex.Hom.sqTo_id

No changes to strong technical debt.
No changes to weak technical debt.

Current commit b348a07fcd
Reference commit 3eae40f5eb

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.py pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@mathlib-dependent-issues mathlib-dependent-issues Bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Oct 9, 2026
@mathlib-merge-conflicts mathlib-merge-conflicts Bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Nov 7, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@mathlib-dependent-issues mathlib-dependent-issues Bot removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Nov 18, 2026
@mathlib-dependent-issues

Copy link
Copy Markdown

This PR/issue depends on:

@github-actions github-actions Bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Nov 18, 2026
@JovanGerb JovanGerb removed the WIP Work in progress label Nov 21, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tech debt Fixes cross-cutting technical debt, see the "technical debt counters" stream on zulip

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant